package com.heima.user.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.user.service.ApUserRealNameService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/auth")
@Api(value="用户审核认证",tags="ap_user",description = "用户审核API")
public class ApUserRealNameAuthController {

    @Resource
    private ApUserRealNameService apUserRealNameService;
    @PostMapping("/list")
    @ApiOperation("查询列表")
    public ResponseResult loadListByStatus(@RequestBody AuthDto authDto){
        return apUserRealNameService.loadListByStatus(authDto);
    }


    @PostMapping("/authFail")
    @ApiOperation("审核失败")
    public ResponseResult authFail(@RequestBody AuthDto authDto){
        return apUserRealNameService.authFail(authDto);
    }

    @PostMapping("/authPass")
    @ApiOperation("审核成功")
    public ResponseResult authPass(@RequestBody AuthDto authDto){
        return apUserRealNameService.autSuccess(authDto);
    }
}

